<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>添加题库</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="Public/layui/css/layui.css">
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>登陆</legend>
</fieldset>
<form class="layui-form layui-form-pane" action="" style="width: 90%">


    <div class="layui-form-item">
        <label class="layui-form-label">手机</label>
        <div class="layui-input-block">
            <input type="text" id="mobile" name="mobile" lay-verify="mobile" autocomplete="off" placeholder="输入手机号" class="layui-input" value="">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-block">
            <input type="password" id="pass" name="pass" lay-verify="pass" autocomplete="off" placeholder="请输入密码" class="layui-input" value="">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <a href="javascript:verify();" id="login"  class="layui-btn" lay-submit="" lay-filter="demo1">登陆</a>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script type="application/javascript" src="Public/layui/layui.js"></script>
<script type="application/javascript" src="Public/Common/Js/jquery-1.8.0.min.js"></script>
<script>

    $(function(){
        // 文档就绪
    });

    function settime() {
        // window.location.href = 'Admin_Topic_NewTopicUI.html?examination_id=<{$examination_id}>';
        var index=parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    }


    layui.use(['form', 'laydate'], function() {
        var form = layui.form(),
            layer = layui.layer,
            laydate = layui.laydate;

    });


    function verify() {
        $.post('Login-Index-VerifyLogin.html',{'mobile':$("#mobile").val(),'pass':$("#pass").val()},function (ret) {
            if(ret.code == 200){
                layer.msg('登陆成功');
                setTimeout('settime()', 1500);//延时执行，让人看得更清楚
            }else{
                layer.alert(ret.message);
            }
        },'json');
    }

</script>
</body>
</html>